// 加载商品列表
let uid = localStorage.getItem('uid')
console.log(uid);
async function LoadList() {
    let ListApI = 'http://jx.xuzhixiang.top/ap/api/productlist.php' //商品列表接口
    try {
        let {
            data
        } = await axios.get(ListApI, {
            params: {
                uid: 50419
            }
        })
        console.log(data.data);
        let Allproduct = data.data
        console.log(Allproduct);
        let res = Allproduct.map(
            v => `
            <div>
            <a href="detil.html?pid=${v.pid}">
            <img src="${v.pimg}" alt="">    
            <p>${v.pname}</p>
           <p>${v.pprice}</p> 
             </div></a>`
        )

        console.log(res);
        let shopListRight = document.querySelector('.shopListRight')
        console.log(shopListRight);
        shopListRight.innerHTML = res.join('')
    } catch (error) {
        console.log('事变');
    }
}
LoadList()